import React from 'react'

import "./index.scss"
function HouseItem({
    src,
    title,
    desc,
    tags,
    price,
    onClick,
    style
}) {
    return (
        <div className="house-list-contaner-item" onClick={onClick} style={style}>
            <div className="house-list-contaner-item-img">
                <img src={src} />
            </div>

            <div className="house-list-contaner-item-right">
                <p className="house-list-contaner-item-right-title">{title}</p>
                <p className="house-list-contaner-item-right-explain">{desc}</p>
                <p className="house-list-contaner-right-tag" >{tags.map((i, index) => {
                    const tagsClass = 'tag' + (index + 1)
                    return (<span className={tagsClass} key={i} >{i}</span>)
                })}</p>
                <p className="house-list-contaner-item-right-price"><span>{price}</span> 元/月</p>
            </div>
        </div>
    )
}
export default HouseItem